# 直接sort
class Solution:
    def GetLeastNumbers_Solution(self, tinput, k):
        # write code here
        tinput.sort()
        res = []
        if k <= len(tinput):
            for index in range(k):
                res.append(tinput[index])
        else:
            res = []
        return res